/***************************************************************
An ABC.
This class contains the genome information of the NCUC model used by genetic
algorithms.  It tells genetic algorithms the length (number of digits) of a binary string,
and the upper and lower bound of a specific parameter.  If the binary string genome 
representation is used, the precision of binary coding is also calculated.  Users also can
set a precision of a specific parameter ( the upper and lower bounds are known)
and then this class can return the minimal required length of the specific parameter.
Author: Chun-Ming Wang
Date of Modification: 01/06/2006 (dd/mm/yyyy)
***************************************************************/
#pragma once
#ifndef _GenomeType
#define _GenomeType
#include "Misc.h"
class GenomeType
{
public:
	unsigned int length() const ;
	void length(const unsigned int &len);
	virtual unsigned int precision(const double &accuracy) = 0;
	virtual double precision() const = 0;
	virtual double upper() const = 0;
	virtual double lower() const = 0;
protected:
	GenomeType();
	explicit GenomeType(const unsigned int dits);
private:
	unsigned int m_length; // store the length of a binary string
};
#endif